package com.ant.storage.dto;

import com.ant.storage.common.PageRequest;
import com.ant.storage.pojo.GoodsPoolCommodity;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author hzd
 * @version 1.0
 * @date 2022/3/21 14:15
 */
@Data
public class GoodsPoolDto extends PageRequest {

    private Integer id;

    private Integer commodityId;

    @ApiModelProperty(value = "城市id")
    private List<Integer> cityId;

    @NotNull(message="申请部门Id不能为空")
    @ApiModelProperty(value = "申请部门")
    private Integer departmentId;

    @NotBlank(message="申请部门不能为空")
    @ApiModelProperty(value = "申请部门")
    private String departmentName;

    @ApiModelProperty(value = "采购清单编号")
    @TableField("subscribe_number")
    private String subscribeNumber;

    @NotNull(message="申请人不能为空")
    @Min(value = 1, message = "填写申请人id")
    @ApiModelProperty(value = "申请人")
    private Integer proposerId;

    @ApiModelProperty(value = "申请状态 0 未处理  1 已提交 2 审核通过 3 审核驳回")
    @TableField("apply_status")
    private Integer applyStatus;

    @NotEmpty(message="备注不能为空")
    private String remark;

    @NotNull(message="采购人不能为空")
    @Min(value = 1, message = "填写采购人id")
    @ApiModelProperty(value = "采购人")
    private Integer purchaserId;

    @ApiModelProperty(value = "申请金额")
    private BigDecimal price;


    @TableField("creator_by")
    private String creatorBy;

    @NotNull (message = "物品不能为空")
    @Size (min = 1, message = "至少要有一个物品")
    @ApiModelProperty(value = "申请物品列表")
    private List<GoodsPoolCommodity> goodsList;


    @ApiModelProperty("时间段")
    private List<String>  time;

}
